home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 10 / AACD 10.iso / AACD / Games / MAME / src / machine / eeprom.h < prev    next >
C/C++ Source or Header  |  2000-05-01  |  909b  |  30 lines

  1. #ifndef EEPROM_H
  2. #define EEPROM_H
  3.  
  4. struct EEPROM_interface
  5. {
  6.     int address_bits;    /* EEPROM has 2^address_bits cells */
  7.     int data_bits;        /* every cell has this many bits (8 or 16) */
  8.     char *cmd_read;        /*  read command string, e.g. "0110" */
  9.     char *cmd_write;    /* write command string, e.g. "0111" */
  10.     char *cmd_erase;    /* erase command string, or 0 if n/a */
  11.     char *cmd_lock;        /* lock command string, or 0 if n/a */
  12.     char *cmd_unlock;    /* unlock command string, or 0 if n/a */
  13.     int enable_multi_read;/* set to 1 to enable multiple values to be read from one read command */
  14. };
  15.  
  16.  
  17. void EEPROM_init(struct EEPROM_interface *interface);
  18.  
  19. void EEPROM_write_bit(int bit);
  20. int EEPROM_read_bit(void);
  21. void EEPROM_set_cs_line(int state);
  22. void EEPROM_set_clock_line(int state);
  23.  
  24. void EEPROM_load(void *file);
  25. void EEPROM_save(void *file);
  26.  
  27. void EEPROM_set_data(UINT8 *data, int length);
  28.  
  29. #endif
  30.